package com.tourscool.springboot.starter.log;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author Cedric
 * @date 2022/07/06 17:35
 * @description 日志配置类
 */
@Data
@ConfigurationProperties(prefix = "aop.logging")
public class LogProperties {

    private String logDir;
    /** 因为logback和log4j的日志格式略有不同，所以提供2种打印格式*/
    private String logbackPattern = "%d{yyyy-MM-dd HH:mm:ss.SSS} %X{traceId} %-5level %logger{30} : %msg%n";
    private String log4jPattern = "%d{yyyy-MM-dd HH:mm:ss.SSS} %X{traceId} %-5level %clr{%-30.30c{1.}}{cyan} : %msg%n";
}
